import request from '@/utils/request'

export function getRedPacket(params) {
  return request({
    url: '/admin/red-packet',
    method: 'get',
    params
  })
}
export function addRedPacket(data) {
  return request({
    url: '/admin/red-packet',
    method: 'post',
    data
  })
}
export function getRedPacketUrl(id) {
  return request({
    url: `/admin/red-packet/${id}/down`,
    method: 'get',
  })
}
export function getDownTxt(id) {
  return request({
    url: `/admin/red-packet/${id}/downTxt`,
  method: 'get',
  })
}

export function updateStatus(id) {
  return request({
    url: `/admin/red-packet/${id}/status`,
    method: 'put',
  })
}
